// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.linqingying.gitcode.pullrequest.data.provider

import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.util.NlsSafe
import com.intellij.util.concurrency.annotations.RequiresEdt
import com.linqingying.gitcode.api.data.GitCodeIssueCommentWithHtml
import java.util.concurrent.CompletableFuture

interface GCPRCommentsDataProvider {

  @RequiresEdt
  fun addComment(progressIndicator: ProgressIndicator, body: String)
    : CompletableFuture<GitCodeIssueCommentWithHtml>

  @RequiresEdt
  fun updateComment(progressIndicator: ProgressIndicator, commentId: String, text: String): CompletableFuture<@NlsSafe String>

  @RequiresEdt
  fun deleteComment(progressIndicator: ProgressIndicator, commentId: String): CompletableFuture<out Any?>

}
